<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1, maximum-scale=1"
    />
    <!--    <link rel="icon" href="assets/images/zhi_favicon.ico"/>-->
    <link rel="icon" id="linkHref" href="" />
    <title id="adminTile"></title>
    <link rel="stylesheet" href="assets/libs/layui/css/layui.css" />
    <link rel="stylesheet" href="assets/module/admin.css?v=312" />
    <link rel="stylesheet" href="assets/module/fileCommon.css" />
    <link
      rel="stylesheet"
      href="assets/module/iconFonts/font-awesome-4.7.0/css/font-awesome.min.css"
    />

    <script>
      /^http(s*):\/\//.test(location.href) ||
        alert("请先部署到 localhost 下再访问");
    </script>
    <style>
      .layui-layout-admin .layui-header .layui-layout-left a {
        color: #ffffff !important;
      }
      .left-nav {
        height: 100%;
        display: flex;
        align-items: center;
      }
      .left-nav img {
        height: 46px;
        margin-left: 8px;
      }
      .left-nav span {
        display: inline-block;
        font-size: 16px;
        padding-left: 15px;
      }
      .layui-layout-admin .top-nav.layui-header a {
        color: #333333 !important;
      }
      .layui-layout-admin .layui-header .menu .layui-nav-item a {
        /*min-width: 110px;*/
        padding: 0 10px;
        font-size: 16px;
        text-align: center;
      }
      .layui-layout-admin
        .layui-header
        .layui-layout-left
        .layui-nav-item
        .layui-icon {
        font-size: 20px;
      }

      .layui-layout-admin .layui-header .layui-nav .layui-this,
      .layui-layout-admin .layui-header .layui-nav .nav-active,
      .layui-layout-admin .layui-header .layui-nav .layui-this:after {
        background-color: #00b559 !important;
      }
    </style>
  </head>

  <body class="layui-layout-body">
    <div class="layui-layout layui-layout-admin">
      <!-- 头部 -->
      <div class="layui-header">
        <!--<div class="layui-logo">-->
        <!--<img src="assets/images/logo.png"/>-->
        <!--<cite>FLD</cite>-->
        <!--</div>-->
        <div class="left-nav">
          <img src="" id="headerBackgroundLogo" style="opacity: 0" />
        </div>
        <!--        <ul class="layui-nav layui-layout-left">-->
        <!--            <li class="layui-nav-item" lay-unselect>-->
        <!--                <a ew-event="flexible" title="侧边伸缩"><i class="layui-icon layui-icon-shrink-right"></i></a>-->
        <!--            </li>-->
        <!--            &lt;!&ndash;<li class="layui-nav-item" lay-unselect>&ndash;&gt;-->
        <!--            &lt;!&ndash;<a ew-event="refresh" title="刷新"><i class="layui-icon layui-icon-refresh-3"></i></a>&ndash;&gt;-->
        <!--            &lt;!&ndash;</li>&ndash;&gt;-->
        <!--        </ul>-->
        <ul
          class="layui-nav layui-layout-left menu"
          style="margin-left: 258px"
        ></ul>
        <ul class="layui-nav layui-layout-right">
          <li class="layui-nav-item" lay-unselect>
            <!--                <a ew-event="message" title="消息">-->
            <!--                    <i class="layui-icon layui-icon-notice"></i>-->
            <!--                    <span class="layui-badge-dot"></span>&lt;!&ndash;小红点&ndash;&gt;-->
            <!--                </a>-->
            <!--            </li>-->
            <!--            <li class="layui-nav-item" lay-unselect>-->
            <!--                <a ew-event="note" title="便签"><i class="layui-icon layui-icon-note"></i></a>-->
          </li>
          <li class="layui-nav-item layui-hide-xs" lay-unselect>
            <a ew-event="fullScreen" title="全屏"
              ><i class="layui-icon layui-icon-screen-full"></i
            ></a>
          </li>
          <li class="layui-nav-item" lay-unselect>
            <a>
              <img src="assets/images/head.png" class="layui-nav-img" />
              <cite id="huName"></cite>
            </a>
            <dl class="layui-nav-child">
              <!--                    <dd lay-unselect><a href="#/template/user-info">个人中心</a></dd>-->
              <dd lay-unselect><a ew-event="password">修改密码</a></dd>
              <hr />
              <dd lay-unselect><a ew-event="updInfo">个人信息</a></dd>
              <hr />
              <dd lay-unselect>
                <a ew-event="logout" data-url="/admin/login.html">退出</a>
              </dd>
            </dl>
          </li>
          <li class="layui-nav-item" lay-unselect>
            <!-- <a title="设置"><i class="layui-icon layui-icon-more-vertical"></i></a> -->
            <a ew-event="theme" title="设置"
              ><i class="layui-icon layui-icon-more-vertical"></i
            ></a>
          </li>
        </ul>
      </div>

      <!-- 侧边栏 -->
      <div class="layui-side">
        <div class="layui-side-scroll"></div>
      </div>

      <!-- 主体部分 -->
      <div class="layui-body"></div>

      <!-- 底部 -->
      <!--<div class="layui-footer">-->
      <!--<span id="onlineCount"></span></span><span class="pull-right">copyright © 2020 wing.vip all rights reserved. </span>-->
      <!--</div>-->
    </div>

    <!-- 侧边栏渲染模板 -->
    <script id="sideNav" type="text/html">
      <ul
        class="layui-nav layui-nav-tree arrow2 {{# if(!d.isShow){ }}layui-hide{{# } }}"
        lay-accordion="true"
        lay-filter="admin-side-nav"
        data-name="{{d.name}}"
      >
        {{# layui.each(d.subMenus, function(index, item){ }}
        <li class="layui-nav-item">
          <a href="{{item.url}}"
            ><i class="fa {{item.icon}}"></i>&emsp;<cite
              >{{ item.name}}</cite
            ></a
          >
          {{# if(item.subMenus&&item.subMenus.length>0){ }}
          <dl class="layui-nav-child">
            {{# layui.each(item.subMenus, function(index, subItem){ }}
            <dd>
              <a href="{{ subItem.url }}">{{ subItem.name }}</a>

              {{# if(subItem.subMenus&&subItem.subMenus.length>0){ }}
              <dl class="layui-nav-child">
                {{# layui.each(subItem.subMenus, function(index, thrItem){ }}
                <dd>
                  <a href="{{ thrItem.url }}">{{ thrItem.name }}</a>

                  {{# if(thrItem.subMenus&&thrItem.subMenus.length>0){ }}
                  <dl class="layui-nav-child">
                    {{# layui.each(thrItem.subMenus, function(index, fourItem){
                    }}
                    <dd>
                      <a href="{{ fourItem.url }}">{{ fourItem.name }}</a>

                      {{# if(fourItem.subMenus&&fourItem.subMenus.length>0){ }}
                      <dl class="layui-nav-child">
                        {{# layui.each(fourItem.subMenus, function(index,
                        fiveItem){ }}
                        <dd>
                          <a href="{{ fiveItem.url }}">{{ fiveItem.name }}</a>
                        </dd>
                        {{# }); }}
                      </dl>
                      {{# } }}
                    </dd>
                    {{# }); }}
                  </dl>
                  {{# } }}
                </dd>
                {{# }); }}
              </dl>
              {{# } }}
            </dd>
            {{# }); }}
          </dl>
          {{# } }}
        </li>
        {{# }); }}
      </ul>
    </script>

    <script id="sideNav2" type="text/html">
      {{# layui.each(d, function(index, item){ }}
      <li
        class="layui-nav-item {{# if(item.isShow){ }}nav-active{{# } }}"
        data-name="{{item.name}}"
      >
        <a href="{{ item.url }}">{{item.name}}</a>
      </li>
      {{# }); }}
    </script>

    <!-- js部分 -->
    <script type="text/javascript" src="assets/libs/layui/layui.js"></script>
    <script type="text/javascript" src="assets/js/main.js?v=307"></script>
    <script type="text/javascript" src="assets/js/xm-select.js?v=307"></script>
    <script
      type="text/javascript"
      src="assets/js/decimal.min.js?v=307"
    ></script>
    <script>
      var img_path = "";
      var $, layer;
      // let backgroundLogo = 'assets/images/logo_bg.png';
      // let backgroundLogo = 'assets/images/wrf-white-logo.png';
      var origin = window.location.href;
      var urlCode = origin.substr(origin.lastIndexOf("//") + 2, 5);
      // var backgroundLogo = urlCode === 'z0001' ? 'assets/images/jc-white-logo.png' : (urlCode === 'z0003' || urlCode === 'z0016') ? 'assets/images/yunduan-white-logo.png' : 'assets/images/wrf-white-logo.png';
      var backgroundLogo = "assets/images/initial-headerBackgroundLogo.png";
      // var adminTile = urlCode === 'z0001' ? '劲驰智能工具柜' :(urlCode === 'z0003' || urlCode === 'z0016') ? '云端智能工具柜' : '沃尔孚智能工具柜'
      var adminTile = "智能柜";

      function previewImg(index) {
        var img = new Image();
        img.src = $(index).attr("src");
        var height = img.height; //获取图片高度
        var width = img.width; //获取图片宽度
        if (width > 1000) {
          height = (1000 / width) * height;
          width = 1000;
          if (height > 800) {
            width = (800 / height) * width;
            height = 800;
          }
        }
        if (height > 800) {
          width = (800 / height) * width;
          height = 800;
        }

        var imgHtml =
          "<img src='" +
          $(index).attr("src") +
          "' style='width: " +
          width +
          "px; height: " +
          height +
          "px;' />";
        //弹出层
        layer.open({
          type: 1,
          shade: 0.8,
          offset: "auto",
          area: [width + "px", height + 50 + "px"],
          shadeClose: true, //点击外围关闭弹窗
          scrollbar: false, //不现实滚动条
          title: "图片预览", //不显示标题
          content: imgHtml, //捕获的元素，注意：最好该指定的元素要存放在body最外层，否则可能被其它的相对元素所影响
          cancel: function () {
            //layer.msg('捕获就是从页面已经存在的元素上，包裹layer的结构', { time: 5000, icon: 6 });
          },
        });
      }
    </script>
  </body>
</html>
